Skip to content

[FEATURE REQUEST] Allow passcode and pattern screens in landscape mode#4871

Open
joragua wants to merge 4 commits into
masterfrom
feature/passcode_and_pattern_in_landscape
Open

[FEATURE REQUEST] Allow passcode and pattern screens in landscape mode#4871
joragua wants to merge 4 commits into
masterfrom
feature/passcode_and_pattern_in_landscape

Conversation

@joragua
Copy link
Copy Markdown
Contributor

@joragua joragua commented May 21, 2026

Related Issues

App: -

Starting from Android 16, Android will ignore resizability and orientation restrictions for large screen devices, such as foldables and tablets. That means that the android: screenOrientation configuration in the manifest will be ignored, and screens using that configuration should support both orientations (portrait and landscape). In our case, we have two screens affected by this restriction: passcode and pattern screens

Work done:

  • Passcode

    • New layout for landscape (phones)
    • New layout for landscape (tablets)
    • Renamed w600dp with sw600dp in order to use the layout-land for phones in landscape
  • Pattern

    • New layout for landscape (phones)
    • Renamed w600dp with sw600dp in order to use the layout-land for phones in landscape
Captura de pantalla 2026-05-21 a las 13 59 02
  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

@joragua joragua self-assigned this May 21, 2026
@joragua joragua added this to the 4.8.1 - Current milestone May 21, 2026
@joragua joragua force-pushed the feature/passcode_and_pattern_in_landscape branch 3 times, most recently from 1d70daa to 6c990bc Compare May 21, 2026 13:02
@joragua joragua force-pushed the feature/passcode_and_pattern_in_landscape branch from 6c990bc to 0cb53a7 Compare May 22, 2026 08:14
@joragua joragua marked this pull request as ready for review May 22, 2026 09:04
@joragua joragua requested a review from jesmrec May 22, 2026 09:04
Copy link
Copy Markdown
Contributor

@jesmrec jesmrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments there, @joragua

android:orientation="vertical"
app:layout_constraintGuide_percent="0.35" />

</androidx.constraintlayout.widget.ConstraintLayout>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extensible to the complete PR:

Files referring passcode called passcodelock
Files referring pattern called activity_pattern_lock

Shouldn't they follow the same name convention? (that's a regression, not from this PR, but i had to comment it 😄 )

android:layout_height="wrap_content"
android:layout_marginTop="@dimen/standard_margin"
android:gravity="center"
android:text="@string/pass_code_enter_pass_code"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string refers to passcode, and this layout is for pattern. Is that incorrect?

android:filterTouchesWhenObscured="true">

<TextView
android:id="@+id/header"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds not very descriptive. I'd set something like passcode_header or similar

android:filterTouchesWhenObscured="true">

<TextView
android:id="@+id/header"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

app:layout_constraintTop_toTopOf="parent"/>

<TextView
android:id="@+id/explanation"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd set a more descriptive name as well

app:layout_constraintTop_toBottomOf="@id/error" />

<com.owncloud.android.presentation.security.passcode.NumberKeyboard
android:id="@+id/numberKeyboard"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ids are snakecase in other layouts

</LinearLayout>

<TextView
android:id="@+id/error"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename as error_passcode because in pattern the id is error_pattern

</LinearLayout>

<TextView
android:id="@+id/error"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename as error_passcode because in pattern the id is error_pattern

android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.25" />
app:layout_constraintGuide_percent="0.3" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: this tiny change (0.25 -> 0.3) is really meaningful? why?

android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.75" />
app:layout_constraintGuide_percent="0.7" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above: this tiny change (0.75 -> 0.7) is really meaningful? why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants